package kr.saeildamil.androidstudy.ch05;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class Ch05Main extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch05_main);
	}

	public void mOnClick(View v) {
		switch (v.getId()) {
		case R.id.main_weight_btn:
			startActivity(new Intent(this, GravityEx1.class));
			break;
		case R.id.main_padding:
			startActivity(new Intent(this, PaddingEx.class));
			break;
		case R.id.main_relative_btn:
			startActivity(new Intent(this, RelativeEx.class));
			break;
		case R.id.main_frame_btn:
			startActivity(new Intent(this, FrameEx.class));
			break;
		case R.id.main_table_btn:
			startActivity(new Intent(this, TableEx.class));
			break;
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
